package com.sojson.project.dao.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.sojson.base.impl.BaseDaoImpl;
import com.sojson.project.dao.WorkExperienceDao;
import com.sojson.project.entity.po.WorkExperience;

/**
 * 工作经历表Dao实现类(目的:把分页插件从Service层分离,这样就不用每次调Dao接口都要分页)
 * 
 * @author liu
 * @date 2021-04-26
 */
@Repository
public class WorkExperienceDaoImpl extends BaseDaoImpl<WorkExperienceDao, WorkExperience> implements WorkExperienceDao {

    @Resource
    private WorkExperienceDao workExperienceDao;

    /**
     * 单条插入
     * 
     * @param workExperience
     * @return
     */
    @Override
    public int insert(WorkExperience workExperience) {
        return workExperienceDao.insert(workExperience);
    }

    /**
     * 批量插入
     * 
     * @param workExperience
     * @return
     */
    @Override
    public int insertList(List<WorkExperience> workExperiences) {
        return workExperienceDao.insertList(workExperiences);
    }

    /**
     * 通过对象批量删除(物理删除)
     * 
     * @param workExperience
     * @return
     */
    @Override
    public int deleteByDto(WorkExperience workExperience) {
        return workExperienceDao.deleteByDto(workExperience);
    }

    /**
     * 统计全部数量
     * 
     * @return
     */
    @Override
    public int countAll() {
        return workExperienceDao.countAll();
    }

    /**
     * 查询所有
     * 
     * @return
     */
    @Override
    public List<WorkExperience> listAll() {
        return workExperienceDao.listAll();
    }

    /**
     * 根据对象统计数量
     * 
     * @param workExperience
     * @return
     */
    @Override
    public int countByDto(WorkExperience workExperience) {
        return workExperienceDao.countByDto(workExperience);
    }

    /**
     * 根据对象查询
     * 
     * @param workExperience
     * @return
     */
    @Override
    public List<WorkExperience> listByDto(WorkExperience workExperience) {
        startPage(workExperience);
        return workExperienceDao.listByDto(workExperience);
    }

    /**
     * 通过id删除(物理删除)
     * 
     * @param id
     * @return
     */
    @Override
    public int deleteById(Integer id) {
        return workExperienceDao.deleteById(id);
    }

    /**
     * 通过id列表删除(物理删除)
     * 
     * @param ids
     * @return
     */
    @Override
    public int deleteByIdList(List<Integer> ids) {
        return workExperienceDao.deleteByIdList(ids);
    }

    /**
     * 通过id更新(全部更新)
     * 
     * @param workExperience
     * @return
     */
    @Override
    public int updateById(WorkExperience workExperience) {
        return workExperienceDao.updateById(workExperience);
    }

    /**
     * 通过id列表更新(全部更新)(更新内容相同)
     * 
     * @param workExperience
     * @return
     */
    @Override
    public int updateStaticByIdList(WorkExperience workExperience) {
        return workExperienceDao.updateStaticByIdList(workExperience);
    }

    /**
     * 通过id列表更新(全部更新)(更新内容不相同)
     * 
     * @param workExperiences
     * @return
     */
    @Override
    public int updateChangeByIdList(List<WorkExperience> workExperiences) {
        return workExperienceDao.updateChangeByIdList(workExperiences);
    }

    /**
     * 通过id更新(局部更新)
     * 
     * @param workExperience
     * @return
     */
    @Override
    public int updatePartialById(WorkExperience workExperience) {
        return workExperienceDao.updatePartialById(workExperience);
    }

    /**
     * 通过id列表更新(局部更新)(更新内容相同)
     * 
     * @param workExperience
     * @return
     */
    @Override
    public int updateStaticPartialByIdList(WorkExperience workExperience) {
        return workExperienceDao.updateStaticPartialByIdList(workExperience);
    }

    /**
     * 通过id列表更新(局部更新)(更新内容不相同)
     * 
     * @param workExperiences
     * @return
     */
    @Override
    public int updateChangePartialByIdList(List<WorkExperience> workExperiences) {
        return workExperienceDao.updateChangePartialByIdList(workExperiences);
    }

    /**
     * 通过id查询
     * 
     * @param id
     * @return
     */
    @Override
    public WorkExperience findById(Integer id) {
        return workExperienceDao.findById(id);
    }

    /**
     * 通过id列表查询
     * 
     * @param ids
     * @return
     */
    @Override
    public List<WorkExperience> findByIdList(List<Integer> ids) {
        return workExperienceDao.findByIdList(ids);
    }

    /**
     * 通过对象查询id列表
     * 
     * @param workExperience
     * @return
     */
    @Override
    public List<Integer> findIdByDto(WorkExperience workExperience) {
        startPage(workExperience);
        return workExperienceDao.findIdByDto(workExperience);
    }

    /**
     * 通过userId删除(物理删除)
     * 
     * @param userId
     * @return
     */
    @Override
    public int deleteByUserId(Integer userId) {
        return workExperienceDao.deleteByUserId(userId);
    }

    /**
     * 通过userId列表删除(物理删除)
     * 
     * @param userIds
     * @return
     */
    @Override
    public int deleteByUserIdList(List<Integer> userIds) {
        return workExperienceDao.deleteByUserIdList(userIds);
    }

    /**
     * 通过userId更新(全部更新)
     * 
     * @param workExperience
     * @return
     */
    @Override
    public int updateByUserId(WorkExperience workExperience) {
        return workExperienceDao.updateByUserId(workExperience);
    }

    /**
     * 通过userId列表更新(全部更新)(更新内容相同)
     * 
     * @param workExperience
     * @return
     */
    @Override
    public int updateStaticByUserIdList(WorkExperience workExperience) {
        return workExperienceDao.updateStaticByUserIdList(workExperience);
    }

    /**
     * 通过userId列表更新(全部更新)(更新内容不相同)
     * 
     * @param workExperiences
     * @return
     */
    @Override
    public int updateChangeByUserIdList(List<WorkExperience> workExperiences) {
        return workExperienceDao.updateChangeByUserIdList(workExperiences);
    }

    /**
     * 通过userId更新(局部更新)
     * 
     * @param workExperience
     * @return
     */
    @Override
    public int updatePartialByUserId(WorkExperience workExperience) {
        return workExperienceDao.updatePartialByUserId(workExperience);
    }

    /**
     * 通过userId列表更新(局部更新)(更新内容相同)
     * 
     * @param workExperience
     * @return
     */
    @Override
    public int updateStaticPartialByUserIdList(WorkExperience workExperience) {
        return workExperienceDao.updateStaticPartialByUserIdList(workExperience);
    }

    /**
     * 通过userId列表更新(局部更新)(更新内容不相同)
     * 
     * @param workExperiences
     * @return
     */
    @Override
    public int updateChangePartialByUserIdList(List<WorkExperience> workExperiences) {
        return workExperienceDao.updateChangePartialByUserIdList(workExperiences);
    }

    /**
     * 通过userId查询
     * 
     * @param userId
     * @return
     */
    @Override
    public WorkExperience findByUserId(Integer userId) {
        return workExperienceDao.findByUserId(userId);
    }

    /**
     * 通过userId列表查询
     * 
     * @param userIds
     * @return
     */
    @Override
    public List<WorkExperience> findByUserIdList(List<Integer> userIds) {
        return workExperienceDao.findByUserIdList(userIds);
    }

    /**
     * 通过对象查询userId列表
     * 
     * @param workExperience
     * @return
     */
    @Override
    public List<Integer> findUserIdByDto(WorkExperience workExperience) {
        startPage(workExperience);
        return workExperienceDao.findUserIdByDto(workExperience);
    }

    /**
     * 清空数据(物理清空)
     */
    @Override
    public void clear() {
        workExperienceDao.clear();
    }

}